package com.aaa.controller;

import com.aaa.dao.BrandMapper;
import com.wsc.entity.Brand;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("brand")
public class BrandController {
    @Resource
    BrandMapper brandService;
    @RequestMapping("select")
    public Object select(){
        return brandService.selectList(null);
    }
    @RequestMapping("insert")
    public Integer insert(Brand brand){
        return brandService.insert(brand);
    }
    @RequestMapping("delete")
    public Integer delete(Integer id){
        return brandService.deleteById(id);
    }
    @RequestMapping("update")
    public Integer update(Brand brand){
        return brandService.updateById(brand);
    }
}
